{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "4fd94a19",
   "metadata": {},
   "source": [
    "# 快速成为深度学习全栈工程师第9课书面作业\n",
    "\n",
    "学号：114499\n",
    "\n",
    "**作业内容：**  \n",
    "1. ImageNet有多少张图片，多少个分类，它的图片大小固定吗？\n",
    "2. 物体分类常用Loss Function有哪些？"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "71fe9ef1",
   "metadata": {},
   "source": [
    "## 第1题\n",
    "ImageNet有多少张图片，多少个分类，它的图片大小固定吗？"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "85cdb460",
   "metadata": {},
   "source": [
    "答：  \n",
    "ImageNet一共有14,197,122张图片，有21841个分类，同时它的图片大小并不固定。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ebd2ab63",
   "metadata": {},
   "source": [
    "## 第2题\n",
    "物体分类常用Loss Function有哪些？"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fdfeba36",
   "metadata": {},
   "source": [
    "答：  \n",
    "* crossentropy loss：交叉熵损失函数；  \n",
    "* softmax loss；  \n",
    "* center loss：中心损失同时学习一个深部中心并惩罚深度特征与其对应的类中心之间的距离,使特征更集中；  \n",
    "* Large-Margin Softmax Loss：L-softmax在Softmax的基础上对W和x的角度引入正整数扩充m，使分类条件更加严苛，此时分类面变成了两个，并且两个面中间存在（m-1）倍角度的间隙。把不同的类区分开，把同一个类压缩的更紧, 直观的看就是把两个类的簇进行压缩，尽量让二者之间留有一个比较大的margin，这样更容易区分不同的类。  \n",
    "* angular softmax loss：在原始Softmax的基础上不仅对角度添加m倍数的限制，还对A-Softmax上一层全连接层的W和b做出||W||=1和b=0两个限制。由此以来，A-Softmax的分类过程仅依赖于W和x之间的角度。  \n",
    "* coco loss/NormFace: 主要利用优化类内和类间的余弦相似度。和center loss不太一样的地方是这里只有一个loss，将center 信息与softmax结合到一起。计算任意两个样本的cos相似度并进行优化：同一类间的相似度大，不同类间的相似度小。\n",
    "* Feature Incay\n",
    "* AMSoftmax/CosFace\n",
    "* Arcface/insightFace\n",
    "……"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "93933346",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
